
package net.mappoint.s.mappoint_30;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;


/**
 * <p>Java class for SegmentPreference.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * <p>
 * <pre>
 * &lt;simpleType name="SegmentPreference">
 *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *     &lt;enumeration value="Quickest"/>
 *     &lt;enumeration value="Shortest"/>
 *     &lt;enumeration value="PreferredRoads"/>
 *   &lt;/restriction>
 * &lt;/simpleType>
 * </pre>
 * 
 */
@XmlType(name = "SegmentPreference")
@XmlEnum
public enum SegmentPreference {

    @XmlEnumValue("Quickest")
    QUICKEST("Quickest"),
    @XmlEnumValue("Shortest")
    SHORTEST("Shortest"),
    @XmlEnumValue("PreferredRoads")
    PREFERRED_ROADS("PreferredRoads");
    private final String value;

    SegmentPreference(String v) {
        value = v;
    }

    public String value() {
        return value;
    }

    public static SegmentPreference fromValue(String v) {
        for (SegmentPreference c: SegmentPreference.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        throw new IllegalArgumentException(v);
    }

}
